#ifndef STX_ALGORITHM_REMOVE_COPY_IF_HPP
#define STX_ALGORITHM_REMOVE_COPY_IF_HPP

#include <stx/algorithm/common.hpp>

namespace stx {

template <class InputIterator, class OutputIterator, class Predicate>
inline OutputIterator
remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
{
    for (; first != last; ++first) {
        if (!pred(*first)) {
            *result = *first;
            ++result;
        }
    }
    return result;
}

} // namespace stx

#endif // STX_ALGORITHM_REMOVE_COPY_IF_HPP
